package com.ymatou.shop;

import android.app.Application;

import com.ymatou.shop.cache.CacheManager;
import com.ymatou.shop.cache.impl.DataTranslatorImpl;
import com.ymatou.shop.cache.impl.UrlTranslatorImpl;

public class YmatouApplication extends Application {
	
	private static YmatouApplication mYmatouApplication;
	
	@Override
	public void onCreate() {
		super.onCreate();
		mYmatouApplication = this;
		CacheManager cacheManager = CacheManager.getInstance(this);
		cacheManager.setUrlTranslator(new UrlTranslatorImpl());
		cacheManager.setDataTranslator(new DataTranslatorImpl());
	}
	
	public static YmatouApplication instance(){
		return mYmatouApplication;
	}
	
}
